package com.shanwen.select.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shanwen.select.entity.Role;
import com.shanwen.select.entity.RoleMenu;
import com.shanwen.select.mapper.RoleMapper;
import com.shanwen.select.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    @Autowired
    RoleMapper roleMapper;

    @Override
    public int insertRole(Role role) {
        return roleMapper.insertRole(role);
    }

    @Override
    public void delete(Integer roleId) {
        roleMapper.deleteRoleMenu(roleId);
    }

    @Override
    public void insertRoleMenu(List<RoleMenu> list) {
        roleMapper.insertRoleMenu(list);
    }

}
